/* 
 * Copyright [2018] [Alex/libo(liboms@hotmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.parser.bean;

import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;

import com.hyts.parser.config.DefaultConfig;
import com.hyts.parser.config.ParseContentType;
import com.hyts.parser.config.ParseContentUnit;

/** 
 * @title ParseRequestBean.java  
 * @package com.hyts.parser.bean  
 * @description 解析器操作对象-传输解析请求数据的对象模型  
 * @see {@link com.hyts.parser.config.ParseContentUnit}
 *      {@link com.hyts.parser.config.ParseContentType}
 *      {@link com.hyts.parser.config.DefaultConfig}
 * @author libo/Alex
 * @email liboms@hotmail.com/liboware@163.com  
 * @date 2018年4月9日 
 * @version V1.0 
 */
public final class ParseRequestBean {

	/**  
	 * <p>文件路径</p> 
	 * @fieldName filePath
	 * @fieldType String
	 */ 
	private String filePath;
	
	/**  
	 * <p>最大内容长度限制</p> 
	 * @fieldName maxContentSize
	 * @fieldType int
	 */ 
	private int maxContentSize;
	
	/**  
	 * <p>解析内容单位誉maxContentSize相呼应</p> 
	 * @fieldName parseContentUnit
	 * @fieldType ParseContentUnit
	 */ 
	private ParseContentUnit parseContentUnit;
	
	/**  
	 * <p>metadata元数据</p> 
	 * @fieldName metadata
	 * @fieldType Metadata
	 */ 
	private Metadata metadata;
	
	/**  
	 * <p>ParseContentType:解析类型</p> 
	 * @fieldName parseContentType
	 * @fieldType ParseContentType
	 */ 
	private ParseContentType parseContentType;
	
	/**  
	 * <p>ParseContext:解析上下文</p> 
	 * @fieldName parseContext
	 * @fieldType ParseContext
	 */ 
	private ParseContext parseContext;


	//初始化公共属性对象
	{
		this.metadata = new Metadata();
		this.parseContext = new ParseContext();
	}
	
	/**  
	 * @constructor：ParseBean  
	 * @param filePath 文件解析路径
	 * @param maxContentSize 文件内容大小
	 * @param parseContentUnit 文件内容单位
	 * @param parseContentType 文件内容解析类型 
	 */ 
	public ParseRequestBean(String filePath, int maxContentSize,ParseContentUnit parseContentUnit,
			ParseContentType parseContentType) {
		super();
		this.filePath = filePath;
		this.maxContentSize = maxContentSize;
		this.parseContentUnit = parseContentUnit;
		this.parseContentType = parseContentType;
	}
	
	/**  
	 * @constructor：ParseBean  
	 * @param filePath 文件解析路径
	 * @param maxContentSize 文件内容大小
	 * @param parseContentUnit 文件内容单位
	 */ 
	public ParseRequestBean(String filePath, int maxContentSize,
			ParseContentUnit parseContentUnit) {
		this(filePath,maxContentSize,parseContentUnit,DefaultConfig.DEFAULT_PARSE_CONTENT_TYPE);
	}
	
	/**  
	 * @constructor：ParseBean  
	 * @param filePath 文件解析路径
	 * @param maxContentSize 文件内容大小
	 */ 
	public ParseRequestBean(String filePath, int maxContentSize) {
		this(filePath,maxContentSize,DefaultConfig.DEFAULT_PARSE_CONTENT_UNIT,DefaultConfig.DEFAULT_PARSE_CONTENT_TYPE);
	}

	/**  
	 * @constructor：ParseBean  
	 * @param filePath 文件解析路径
	 * @param parseContentType 文件内容解析类型 
	 */ 
	public ParseRequestBean(String filePath, ParseContentType parseContentType) {
		this(filePath,DefaultConfig.DEFAULT_MAX_CONTENT_SIZE,DefaultConfig.DEFAULT_PARSE_CONTENT_UNIT,parseContentType);
	}

	/**  
	 * @constructor：ParseBean  
	 * @param filePath 文件解析路径
	 */ 
	public ParseRequestBean(String filePath) {
		this(filePath,DefaultConfig.DEFAULT_MAX_CONTENT_SIZE,DefaultConfig.DEFAULT_PARSE_CONTENT_UNIT,DefaultConfig.DEFAULT_PARSE_CONTENT_TYPE);
	}

	/**  
	 * @name filePath's getter method
	 * @param none
	 * @return filePath
	 */
	public String getFilePath() {
		return filePath;
	}

	/**  
	 * @name filePath's setter method
	 * @param filePath
	 * @return void
	 */
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	/**  
	 * @name maxContentSize's getter method
	 * @param none
	 * @return maxContentSize
	 */
	public int getMaxContentSize() {
		return maxContentSize;
	}

	/**  
	 * @name maxContentSize's setter method
	 * @param maxContentSize
	 * @return void
	 */
	public void setMaxContentSize(int maxContentSize) {
		this.maxContentSize = maxContentSize;
	}

	/**  
	 * @name parseContentUnit's getter method
	 * @param none
	 * @return parseContentUnit
	 */
	public ParseContentUnit getParseContentUnit() {
		return parseContentUnit;
	}

	/**  
	 * @name parseContentUnit's setter method
	 * @param parseContentUnit
	 * @return void
	 */
	public void setParseContentUnit(ParseContentUnit parseContentUnit) {
		this.parseContentUnit = parseContentUnit;
	}

	/**  
	 * @name parseContentType's getter method
	 * @param none
	 * @return parseContentType
	 */
	public ParseContentType getParseContentType() {
		return parseContentType;
	}

	/**  
	 * @name parseContentType's setter method
	 * @param parseContentType
	 * @return void
	 */
	public void setParseContentType(ParseContentType parseContentType) {
		this.parseContentType = parseContentType;
	}

	/**  
	 * @name metadata's getter method
	 * @param none
	 * @return metadata
	 */
	public Metadata getMetadata() {
		return metadata;
	}

	/**  
	 * @name parseContext's getter method
	 * @param none
	 * @return parseContext
	 */
	public ParseContext getParseContext() {
		return parseContext;
	}
	
	
	
}
